package util.impl;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Properties;

import util.Constant;

public class ConstantImpl extends Constant
{
  private static Properties properties = new Properties();

  static { try { properties.load(new FileInputStream(new File(ConstantImpl.class.getClassLoader().getResource("constant.properties").toURI())));
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    } catch (URISyntaxException e) {
      e.printStackTrace();
    }
  }

  public Object getObjectByKey(String key)
  {
    return properties.getProperty(key);
  }
}